<script>
import { scaling, setFontSize, getClientWidth, getClientHeight } from "./utils/rem.js";
export default {
  name: "app",
  beforeCreate() {
    setFontSize();
  },
  mounted() {
    this.handleResize();
    window.addEventListener("resize", this.handleResize);
  },
  methods: {
    handleResize() {
      const _scale = scaling(1920, 1080, getClientWidth(), getClientHeight());
      setFontSize();
      this.$root.scale = _scale.scale;

    },
  },
  beforeDestroy() {
    window.removeEventListener("resize", this.handleResize);
  },
  render() {
    return (
      <c-container id="app" direction="vertical">
        <router-view></router-view>
      </c-container>
    );
  },
};
</script>
<style lang="scss">
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
html,
body {
  height: 100%;
  width: 100%;
}
.el-message {
  font-size: 16px;
}
</style>
